package com.hdrx.fundhelper.dao.pojo;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;
import java.math.BigDecimal;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.data.annotation.Id;

/**
 * 用户持仓信息
 *
 * @author htf123456
 * @TableName user_fund_relationship
 */
@Data
@ApiModel
public class UserFundRelationship implements Serializable {

    private static final long serialVersionUID = 860076211332046025L;
    /**
     * id
     */
    @NotNull(message = "[id]不能为空")
    @ApiModelProperty("id")
    @Id
    private Integer id;
    /**
     * 用户id
     */
    @NotNull(message = "[用户id]不能为空")
    @ApiModelProperty("用户id")
    private Integer userId;
    /**
     * 基金代码
     */
    @Size(max = 6, message = "编码长度不能超过6")
    @ApiModelProperty("基金代码")
    @Length(max = 6, message = "编码长度不能超过6")
    private String fundCode;
    /**
     * 基金名称
     */
    @Size(max = 50, message = "编码长度不能超过50")
    @ApiModelProperty("基金名称")
    @Length(max = 50, message = "编码长度不能超过50")
    private String fundName;
    /**
     * 基金份额
     */
    @ApiModelProperty("基金份额")
    private BigDecimal fundShare;
    /**
     * 持仓成本
     */
    @ApiModelProperty("持仓成本")
    private BigDecimal holdingCost;
    /**
     * 最新价格
     */
    @ApiModelProperty("最新价格")
    private BigDecimal latestPrice;
    /**
     * 前个交易日价格
     */
    @ApiModelProperty("前个交易日价格")
    private BigDecimal lastTradingDayPrice;


}
